/** Part of Zombie Navigator
	Copyright © 2016  Zombie Navigator Developers
	
	@file
	@module
	@license AGPL-3.0+
	
*/ 'use strict';


/* Addon SDK dependencies */
const _sdkTimers = require('sdk/timers');


/* Internal APIs */

/**
	@public
	@method
	@param {function} callback
	@param {number} ms
	@returns {undefined}
*/
const setTimeout = (callback, ms) => {
	const sdkTimers = _sdkTimers;
	
	if ('function' != typeof callback) {
		throw new TypeError('Not a function');
	}
	
	if (ms < 0) {
		ms = 0;
	}
	
	sdkTimers.setTimeout(callback, ms | 0);
	
	return;
};


/* Exports */
exports.setTimeout = setTimeout;


// vim: ts=4 noet ai

